<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us" >
<head>
<title>Mozat Angel</title>
<link rel="stylesheet" type="text/css" href="/media/css/base.css" />

<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="/media/css/ie.css" /><![endif]-->

<script type="text/javascript">window.__admin_media_prefix__ = "/media/";</script>

<meta name="robots" content="NONE,NOARCHIVE" />
</head>


<body class="">


    <div id="content" class="colM">

<link rel="stylesheet" type="text/css" href="/media/css/forms.css" />
<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="/media/css/ie.css" /><![endif]-->

		<table>
			<tr>
				<th>Auto Alarm</th><th>Time</th><th>Title</th><th>Widget</th><th>Alarm level</th><th>Alarm mode</th><th>Ticket ID</th><th>Overdue</th><th>Contact result</th><th>Alarm users</th>
			</tr>
				{% for alarmlog in alarmlogs %}
			<tr>
				<td></td>
				<td>{{ alarmlog.created_on|date:"m-d H:i:s" }}</td>
				<td>{{ alarmlog.title.title }}</td>
				<td>{{ alarmlog.widget.title }}</td>
				<td>
						{% if alarmlog.alarmlevel == 2 %}
					<div style="background-color:#AAAAFF;" >{{ alarmlog.alarmlevel }} th</div>
						{% else %}
						{% if alarmlog.alarmlevel == 3 %}
					<div style="background-color:red;" >{{ alarmlog.alarmlevel }} th</div>
						{% else %}
						{% if alarmlog.alarmlevel == 4 %}
					<div style="background-color:yellow;" >{{ alarmlog.alarmlevel }} th</div>
						{% else %}
						{% if alarmlog.alarmlevel == 5 %}
					<div style="background-color:#BE77FF;" >{{ alarmlog.alarmlevel }} th</div>
						{% else %}
						{% if alarmlog.alarmlevel == 6 %}
					<div style="background-color:#FFD306;" >{{ alarmlog.alarmlevel }} th</div>
						{% else %}
					<div style="background-color:#9AFF02;" >{{ alarmlog.alarmlevel }} th</div>
						{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}
				</td>
				<td>
						{% if alarmlog.alarmmode == "email" %}
					<div style="background-color:#FFD306;" >{{ alarmlog.alarmmode }}</div>
						{% else %}
						{% if alarmlog.alarmmode == "sms" %}
					<div style="background-color:red;" >{{ alarmlog.alarmmode }}</div>
						{% else %}
					<div style="background-color:#9AFF02;" >{{ alarmlog.alarmmode }}</div>
						{% endif %}
						{% endif %}
				</td>
				<td><a href="/ticket/show/{{ alarmlog.ticketid }}" >{{ alarmlog.ticketid }}</a></td>
				<td>{% if alarmlog.overdue == "1" %}Not{% else %}<div style="background-color:#9AFF02;" >Yes</div>{% endif %}</td>
				<td>
						{% if alarmlog.contact_result == "fail" %}
					<div style="background-color:red;" >{{ alarmlog.contact_result }}</div>
						{% else %}
						{{ alarmlog.contact_result }}
						{% endif %}
				</th>
				<td>
						{% for user in alarmlog.alarmuser.all %}
						{{ user.name }}
						{% endfor %}
				</td>
			</tr>
				{% endfor %}
		</table>
		<br>
		<table>
			<tr>
				<th>Frequent Alarm</th><th>Time</th><th>Title</th><th>Widget</th><th>Alarm level</th><th>Alarm mode</th><th>Ticket ID</th><th>Contact result</th><th>Alarm users</th>
			</tr>
				{% for falarmlog in frequentAlarmLogs %}
			<tr>
				<td></td>
				<td>{{ falarmlog.lasterror_time|date:"m-d H:i:s" }}</td>
				<td>{{ falarmlog.title.title }}</td>
				<td>{{ falarmlog.widget.title }}</td>
				<td>
						{% if falarmlog.alarmlevel == 2 %}
					<div style="background-color:#AAAAFF;" >{{ falarmlog.alarmlevel }} th</div>
						{% else %}
						{% if falarmlog.alarmlevel == 3 %}
					<div style="background-color:red;" >{{ falarmlog.alarmlevel }} th</div>
						{% else %}
						{% if falarmlog.alarmlevel == 4 %}
					<div style="background-color:yellow;" >{{ falarmlog.alarmlevel }} th</div>
						{% else %}
						{% if falarmlog.alarmlevel == 5 %}
					<div style="background-color:#BE77FF;" >{{ falarmlog.alarmlevel }} th</div>
						{% else %}
						{% if falarmlog.alarmlevel == 6 %}
					<div style="background-color:#FFD306;" >{{ falarmlog.alarmlevel }} th</div>
						{% else %}
					<div style="background-color:#9AFF02;" >{{ falarmlog.alarmlevel }} th</div>
						{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}
				</td>
				<td>
						{% if falarmlog.alarmmode == "email" %}
					<div style="background-color:#FFD306;" >{{ falarmlog.alarmmode }}</div>
						{% else %}
						{% if falarmlog.alarmmode == "sms" %}
					<div style="background-color:red;" >{{ falarmlog.alarmmode }}</div>
						{% else %}
					<div style="background-color:#9AFF02;" >{{ falarmlog.alarmmode }}</div>
						{% endif %}
						{% endif %}
				</td>
				<td><a href="http://ticket.mozat.com/ticket/mainIndex/?url=Ticket/MonView/{{ falarmlog.ticketid }}" >{{ falarmlog.ticketid }}</a></td>
				<td>
						{% if falarmlog.contact_result == "fail" %}
					<div style="background-color:red;" >{{ falarmlog.contact_result }}</div>
						{% else %}
						{{ falarmlog.contact_result }}
						{% endif %}
				</th>
				<td>
						{% for user in falarmlog.alarmuser.all %}
						{{ user.name }}
						{% endfor %}
				</td>
			</tr>
				{% endfor %}
		</table>

        <br class="clear" />
    </div>
    <!-- END Content -->

    <div id="footer"></div>
</div>
<!-- END Container -->

</body>
</html>

